*****************************   
* do-file for estimation	*
* fo 16.12.2015				*
*****************************

version 14
set more off
use "Data\imputed.dta", clear
mi svyset[pweight=X1gewinsg]

local background "parses"   
local values "zigeld"
local education "z_abinote fa_frau unifh promo_fertig"
local work "arbzt_woch beruf1-beruf5 beruf7-beruf9 branche1-branche4 branche6-branche15 privat autonom jobtrain"

************************************************
*** 1. exactly replicate Bobbitt-Zeher(2007) ***
************************************************

*** 1.1 exactly replicate Bobbitt-Zeher(2007), table 1 and appendix table ***
matrix tA2_exact = J(46 , 8, .)
matrix rownames tA2_exact = 1_incyear 2_abinote 3_examennote 4_wiwi 5_natur 6_geist ///
	7_erzieh 8_med 9_kunst 10_jura 11_fafrau 12_keinpromo 13_promo 14_unifh ///
	15_parses 16_zigeld 17_married 18_parent 19_hrsworked 20_privatesec ///
	21_beruf1 22_beruf2 23_beruf3 24_beruf4 25_beruf5 26_beruf6 27_beruf7 28_beruf8 29_beruf9 ///
	30_branche1 31_branche2 32_branche3 33_branche4 34_branche5 35_branche6 36_branche7 37_branche8 ///
	38_branche9 39_branche10 40_branche11 41_branche12 42_branche13 43_branche14 44_branche15 45_jobauton 46_jobtrain
matrix colnames tA2_exact = 1_women_ft 2_women_ft_se 3_men_ft 4_men_ft_se 5_women 6_women_se 7_men 8_men_se

/* 	matrix for tA2_exact
	rows: variables
	 1 - income
	 2 - abitur grade (std.)
	 3 - college leaving grade (std.)
	 4 - college major: econ. sci.
	 5 - college major: math, nat. sci., engineering
	 6 - college major: soc. sci., humanities
	 7 - college major: education
	 8 - college major: medical science
	 9 - college major: art
	10 - college major: law
	11 - percentage female of major
	12 - highest degree: masters degree
	13 - highest degree: doctoral degree
	14 - institutional selectivity: full university
	15 - ses family of origin
	16 - importance of having lots of money
	17 - married
	18 - parenthood
	19 - number of hours worked
	20 - private sector
	21 - occupation: Ia - acriculture, forestry, horticulture 
	22 - occupation: IVab - engineers and technicians 
	23 - occupation: Vab - merchants  
	24 - occupation: Vd
	25 - occupation: Ve
	26 - occupation: Vf
	27 - occupation: Vg
	28 - occupation: Vh
	29 - occupation: Other
	30 - industry: agriculture
	31 - industry: construction
	32 - industry: manufacturing
	33 - industry: utilities
	34 - industry: retail and wholesale
	35 - industry: finance, insurance, real estate
	36 - industry: business, personal services
	37 - industry: entertainment, recreation
	38 - industry: professional services
	39 - industry: public administration
	40 - industry: health care, social services
	41 - industry: communications
	42 - industry: transportation
	43 - industry: education
	44 - industry: other services	
	45 - job autonomy
	46 - job training

	columns:
	Full-time only
	 1 - women's mean
	 2 - s.e.
	 3 - men's mean
	 4 - s.e.
	Full-time and part-time
	 5 - women's mean
	 6 - s.e.
	 7 - men's mean
	 8 - s.e.
	
*/
	
gen arbzt35 = 0
replace arbzt35 = 1 if arbzt_woch >=35 
gen arbzt15 = 0
replace arbzt15 = 1 if arbzt_woch >=15 

local count = 0
foreach var of varlist inc_year z_abinote z_examen fachgr_wiwi fachgr_natur fachgr_geist ///
	fachgr_erzieh fachgr_med fachgr_kunst fachgr_jura fa_frau keine_promo promo_fertig unifh ///
	parses zigeld verhei kinder arbzt_woch privat ///
	beruf1 beruf2 beruf3 beruf4 beruf5 beruf6 beruf7 beruf8 beruf9 ///
	branche1 branche2 branche3 branche4 branche5 branche6 branche7 branche8 branche9 branche10 ///
	branche11 branche12 branche13 branche14 branche15 autonom jobtrain 	{
	
	local count = `count' + 1
	dis " "
	dis " *** "
	dis "`count'"
	dis " *** "
	dis " "
	mi estimate, post: svy, subpop(frau if arbzt35==1) : mean `var'
		matrix tA2_exact[`count', 1] = _b[`var']
		matrix tA2_exact[`count', 2] = _se[`var']
	mi estimate, post: svy, subpop(mann if arbzt35==1) : mean `var'
		matrix tA2_exact[`count', 3] = _b[`var']
		matrix tA2_exact[`count', 4] = _se[`var']
	mi estimate, post: svy, subpop(frau if arbzt15==1) : mean `var'
		matrix tA2_exact[`count', 5] = _b[`var']
		matrix tA2_exact[`count', 6] = _se[`var']
	mi estimate, post: svy, subpop(mann if arbzt15==1) : mean `var'
		matrix tA2_exact[`count', 7] = _b[`var']
		matrix tA2_exact[`count', 8] = _se[`var']
		}

matrix list tA2_exact
putexcel set "Output\tA2_exact.xlsx", replace
putexcel B2 = matrix(tA2_exact, names) using "Output\tA2_exact.xlsx", replace	


*** 1.2 exactly replicate Bobbitt-Zeher(2007), table 2 ***

matrix t1_exact = J(9 , 4 , .)
matrix colnames t1_exact = 1_modelnr 2_betafemale 3_se 4_perc_expl
/* matrix for t2_exact 
	rows: models
	columns:
	1 - model number
	2 - conditional beta female
	3 - s.e.
	4 - percentage of gap explained
	*/

mi estimate, post: qui reg inc_year frau if arbzt_woch>=35 [pweight=X1gewinsg]
	local baseline 		 = _b[frau]
	matrix t1_exact[1,2] = _b[frau]
	matrix t1_exact[1,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' if arbzt_woch>=35 [pweight=X1gewinsg]
	matrix t1_exact[2,2] = _b[frau]
	matrix t1_exact[2,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' fachgr_wiwi-fachgr_geist fachgr_med-fachgr_jura if arbzt_woch>=35 [pweight=X1gewinsg]
	matrix t1_exact[3,2] = _b[frau]
	matrix t1_exact[3,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' fa_frau if arbzt_woch>=35 [pweight=X1gewinsg]
	matrix t1_exact[4,2] = _b[frau]
	matrix t1_exact[4,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' z_abinote if arbzt_woch>=35 [pweight=X1gewinsg]
	matrix t1_exact[5,2] = _b[frau]
	matrix t1_exact[5,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' z_examen if arbzt_woch>=35 [pweight=X1gewinsg]
	matrix t1_exact[6,2] = _b[frau]
	matrix t1_exact[6,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' promo_fertig if arbzt_woch>=35 [pweight=X1gewinsg]
	matrix t1_exact[7,2] = _b[frau]
	matrix t1_exact[7,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' unifh if arbzt_woch>=35 [pweight=X1gewinsg]
	matrix t1_exact[8,2] = _b[frau]
	matrix t1_exact[8,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' fa_frau z_abinote promo_fertig unifh if arbzt_woch>=35 [pweight=X1gewinsg]
	matrix t1_exact[9,2] = _b[frau]
	matrix t1_exact[9,3] = _se[frau]

* compute percentage explained *
forvalues row = 1/9	{
	matrix t1_exact[`row',1] = `row'
	matrix t1_exact[`row',4] = (`baseline' - t1_exact[`row',2]) / `baseline'
	}

matrix list t1_exact
putexcel set "Output\t1_exact.xlsx", replace
putexcel B2 = matrix(t1_exact, names) using "Output\t1_exact.xlsx", replace


***	1.2 exactly replicate Bobbitt-Zeher(2007), table 3 ***

matrix t2_exact = J(6 , 4 , .)
matrix colnames t2_exact = 1_modelnr 2_betafemale 3_se 4_perc_expl

/* matrix for t2_exact 
	rows: models
	columns:
	1 - model number
	2 - conditional beta female
	3 - s.e.
	4 - percentage of gap explained
	*/
	
mi estimate, post: qui reg inc_year frau if arbzt_woch>=35 [pweight=X1gewinsg]
	local baseline 		 = _b[frau]
	matrix t2_exact[1,2] = _b[frau]
	matrix t2_exact[1,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' if arbzt_woch>=35 [pweight=X1gewinsg]
	matrix t2_exact[2,2] = _b[frau]
	matrix t2_exact[2,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' `values' if arbzt_woch>=35 [pweight=X1gewinsg]
	matrix t2_exact[3,2] = _b[frau]
	matrix t2_exact[3,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' `values' `education' if arbzt_woch>=35 [pweight=X1gewinsg]
	matrix t2_exact[4,2] = _b[frau]
	matrix t2_exact[4,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' `values' `education' kinder verhei if arbzt_woch>=35 [pweight=X1gewinsg]
	matrix t2_exact[5,2] = _b[frau]
	matrix t2_exact[5,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' `values' `education' kinder verhei `work' if arbzt_woch>=35 [pweight=X1gewinsg]
	matrix t2_exact[6,2] = _b[frau]
	matrix t2_exact[6,3] = _se[frau]

* compute percentage explained *
forvalues row = 1/6	{
	matrix t2_exact[`row',1] = `row'
	matrix t2_exact[`row',4] = (`baseline' - t2_exact[`row',2]) / `baseline'
	}
matrix list t2_exact
putexcel set "Output\t2_exact.xlsx", replace
putexcel B2 = matrix(t2_exact, names) using "Output\t2_exact.xlsx", replace

	
*** 1.3	exactly replicate Bobbitt-Zeher(2007), table 4 ***

mcenter parses zigeld fa_frau arbzt_woch autonom

mi estimate, cmdok post: oaxaca inc_year ///
	C_parses ///												/* background ses */
	C_zigeld ///												/* importance of having lots of money */ 	
	(scores: z_examen z_abinote) ///							/* scores */
	C_fa_frau ///												/* percentage female of college major */
	unifh ///													/* institutional selectivity */
	promo_fertig ///											/* doctoral degree */
	(family: kinder verhei) ///									/* family formation */
	C_arbzt_woch ///											/* hours worked per week */
	(occupation: beruf1-beruf4 beruf6-beruf9)	///				/* occupation */
	(industry: branche1-branche4 branche6-branche15) /// 		/* industry */
	privat ///													/* sector */
	(otherwork: C_autonom jobtrain) ///
	if arbzt_woch>=35, by(frau) weight(.5) svy
	
est sto t3_exact
esttab  t3_exact using "Output\t3_exact.csv", wide nostar se mtitles replace



****************************************************************************
*** 2. replicate Bobbitt-Zeher(2007), correcting for misattribution ***
****************************************************************************

***	replicate Bobbitt-Zeher(2007) correcting for misspecification only, table 3 ***

matrix t2_corr35 = J(7 , 4 , .)
matrix colnames t2_corr35 = 1_modelnr 2_betafemale 3_se 4_perc_expl
/* matrix for t3_exact 
	rows: models
	columns:
	1 - model number
	2 - conditional beta female
	3 - s.e.
	4 - percentage of gap explained
	*/
mi estimate, post: qui reg inc_year frau if arbzt_woch>=35 [pweight=X1gewinsg]
	local baseline 		  = _b[frau]
	matrix t2_corr35[1,2] = _b[frau]
	matrix t2_corr35[1,3] = _se[frau]	
mi estimate, post: qui reg inc_year frau `background' if arbzt_woch>=35 [pweight=X1gewinsg]
	matrix t2_corr35[2,2] = _b[frau]
	matrix t2_corr35[2,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' `values' if arbzt_woch>=35 [pweight=X1gewinsg]
	matrix t2_corr35[3,2] = _b[frau]
	matrix t2_corr35[3,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' `values' `education' if arbzt_woch>=35 [pweight=X1gewinsg]
	matrix t2_corr35[4,2] = _b[frau]
	matrix t2_corr35[4,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' `values' `education' kinder verhei if arbzt_woch>=35 [pweight=X1gewinsg]
	matrix t2_corr35[5,2] = _b[frau]
	matrix t2_corr35[5,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' `values' `education' kinder kinderxfrau verhei verheixfrau if arbzt_woch>=35 [pweight=X1gewinsg]
	matrix t2_corr35[6,2] = _b[frau]
	matrix t2_corr35[6,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' `values' `education' kinder kinderxfrau verhei verheixfrau `work' if arbzt_woch>=35 [pweight=X1gewinsg]
	matrix t2_corr35[7,2] = _b[frau]
	matrix t2_corr35[7,3] = _se[frau]

* compute percentage explained *
forvalues row = 1/7	{
	matrix t2_corr35[`row',1] = `row'
	matrix t2_corr35[`row',4] = (`baseline' - t2_corr35[`row',2]) / `baseline'
	}
matrix list t2_corr35
putexcel set "Output\t2_corr35.xlsx", replace
putexcel B2 = matrix(t2_corr35, names) using "Output\t2_corr35.xlsx", replace


*************************************************************************************************************
*** 3. replicate Bobbitt-Zeher(2007) with corrections for misattribution and endogeneous sample selection ***
*************************************************************************************************************

*** 3.0 Demonstrate that sample restriction is heavily endogeneous to motherhood ***

matrix tA3 = J(12, 3, .)
matrix rownames tA3 = 1_male_ft 2_se 3_female_ft 4_se 5_diff_ft 6_se 7_male_ftpt 8_se 9_female_ftpt 10_se 11_diff_ftpt 12_se
matrix colnames tA3 = 1_parents 2_notparents 3_total

/* matrix for hrswork 
	rows
	 1 - male, ft
	 2 - se
	 3 - female, ft
	 4 - se
	 5 - difference, ft
	 6 - se
	 7 - male, ftpt
	 8 - se
	 9 - female, ftpt
	10 - se
	11 - difference, ftpt
	12 - se
	
	columns
	 1 - parents
	 2 - non-parents
	 3 - total
*/
mi estimate, post: svy: reg arbzt_woch frau if (kinder==1 & arbzt_woch>=35)
		matrix tA3 [1,1] =  _b[_cons]
		matrix tA3 [2,1] = _se[_cons]
		matrix tA3 [5,1] =  _b[frau]
		matrix tA3 [6,1] = _se[frau]
	lincom _cons + frau
		matrix tA3 [3,1] = r(estimate)
		matrix tA3 [4,1] = r(se)

mi estimate, post: svy: reg arbzt_woch frau if (kinder==0 & arbzt_woch>=35)
		matrix tA3 [1,2] =  _b[_cons]
		matrix tA3 [2,2] = _se[_cons]
		matrix tA3 [5,2] =  _b[frau]
		matrix tA3 [6,2] = _se[frau]
	lincom _cons + frau
		matrix tA3 [3,2] = r(estimate)
		matrix tA3 [4,2] = r(se)		
		
mi estimate, post: svy: reg arbzt_woch frau if (arbzt_woch>=35)
		matrix tA3 [1,3] =  _b[_cons]
		matrix tA3 [2,3] = _se[_cons]
		matrix tA3 [5,3] =  _b[frau]
		matrix tA3 [6,3] = _se[frau]
	lincom _cons + frau
		matrix tA3 [3,3] = r(estimate)
		matrix tA3 [4,3] = r(se)
		
mi estimate, post: svy: reg arbzt_woch frau if (kinder==1 & arbzt_woch>=15)
		matrix tA3 [7,1]  =  _b[_cons]
		matrix tA3 [8,1]  = _se[_cons]
		matrix tA3 [11,1] =  _b[frau]
		matrix tA3 [12,1] = _se[frau]
	lincom _cons + frau
		matrix tA3 [9,1]  = r(estimate)
		matrix tA3 [10,1] = r(se)

mi estimate, post: svy: reg arbzt_woch frau if (kinder==0 & arbzt_woch>=15)
		matrix tA3 [7,2]  =  _b[_cons]
		matrix tA3 [8,2]  = _se[_cons]
		matrix tA3 [11,2] =  _b[frau]
		matrix tA3 [12,2] = _se[frau]
	lincom _cons + frau
		matrix tA3 [9,2]  = r(estimate)
		matrix tA3 [10,2] = r(se)
		
mi estimate, post: svy: reg arbzt_woch frau if (arbzt_woch>=15)
		matrix tA3 [7,3]  =  _b[_cons]
		matrix tA3 [8,3]  = _se[_cons]
		matrix tA3 [11,3] =  _b[frau]
		matrix tA3 [12,3] = _se[frau]
	lincom _cons + frau
		matrix tA3 [9,3]  = r(estimate)
		matrix tA3 [10,3] = r(se)

mat list tA3		
putexcel set "Output\tA3.xlsx", replace
putexcel B2 = matrix(tA3, names) using "Output\tA3.xlsx", replace


*** 3.1 replicate Bobbitt-Zeher(2007), table 3, correcting for moderation of family effect and endogeneous selection ***

matrix t2_corr15 = J(7 , 4 , .)
matrix colnames t2_corr15 = 1_modelnr 2_betafemale 3_se 4_perc_expl
/* matrix for t3_exact 
	rows: models
	columns:
	1 - model number
	2 - conditional beta female
	3 - s.e.
	4 - percentage of gap explained
	*/
mi estimate, post: qui reg inc_year frau if arbzt_woch>=15 [pweight=X1gewinsg]
	local baseline 		  = _b[frau]
	matrix t2_corr15[1,2] = _b[frau]
	matrix t2_corr15[1,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' if arbzt_woch>=15 [pweight=X1gewinsg]
	matrix t2_corr15[2,2] = _b[frau]
	matrix t2_corr15[2,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' `values' if arbzt_woch>=15 [pweight=X1gewinsg]
	matrix t2_corr15[3,2] = _b[frau]
	matrix t2_corr15[3,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' `values' `education' if arbzt_woch>=15 [pweight=X1gewinsg]
	matrix t2_corr15[4,2] = _b[frau]
	matrix t2_corr15[4,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' `values' `education' kinder verhei if arbzt_woch>=15 [pweight=X1gewinsg]
	matrix t2_corr15[5,2] = _b[frau]
	matrix t2_corr15[5,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' `values' `education' kinder kinderxfrau verhei verheixfrau if arbzt_woch>=15 [pweight=X1gewinsg]
	matrix t2_corr15[6,2] = _b[frau]
	matrix t2_corr15[6,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' `values' `education' kinder kinderxfrau verhei verheixfrau `work' if arbzt_woch>=15 [pweight=X1gewinsg]
	matrix t2_corr15[7,2] = _b[frau]
	matrix t2_corr15[7,3] = _se[frau]

* compute percentage explained *
forvalues row = 1/7	{
	matrix t2_corr15[`row',1] = `row'
	matrix t2_corr15[`row',4] = (`baseline' - t2_corr15[`row',2]) / `baseline'
	}
matrix list t2_corr15
putexcel set "Output\t2_corr15.xlsx", replace
putexcel B2 = matrix(t2_corr15, names) using "Output\t2_corr15.xlsx", replace


*** 3.2 replicate Bobbitt-Zeher(2007), table 4, correcting for misattribution of family effect and endogeneous selection ***

mi estimate, cmdok post: oaxaca inc_year ///
	C_parses ///											/* background ses */
	C_zigeld ///											/* importance of having lots of money */ 	
	(scores: z_examen z_abinote) ///						/* scores */
	C_fa_frau ///											/* percentage female of college major */
	unifh ///												/* institutional selectivity */
	promo_fertig ///										/* doctoral degree */
	(family: kinder verhei) ///								/* family formation */
	C_arbzt_woch ///										/* hours worked per week */
	(occupation: beruf1-beruf4 beruf6-beruf9)	///			/* occupation */
	(industry: branche1-branche4 branche6-branche15) /// 	/* industry */
	privat ///												/* sector */
	(otherwork: C_autonom jobtrain) ///
	if arbzt_woch>=15, by(frau) weight(.5) svy
	
est sto t3_corr15
esttab  t3_corr15 using "Output\t3_corr15.csv", wide nostar se mtitles replace


*** 3.3 reproduce Bobbitt-Zeher(2007), table 4, correcting for misattribution of family effect and endogeneous selection and overcontrol bias (work) ***

mi estimate, cmdok post: oaxaca inc_year ///
	C_parses ///											/* background ses */
	C_zigeld ///											/* importance of having lots of money */ 	
	(scores: z_examen z_abinote) ///						/* scores */
	C_fa_frau ///											/* percentage female of college major */
	unifh ///												/* institutional selectivity */
	promo_fertig ///										/* doctoral degree */
	(family: kinder verhei) ///								/* family formation */
	if arbzt_woch>=15, by(frau) weight(.5) svy
	
est sto t3_corr15_nowork
esttab  t3_corr15_nowork using "Output\t3_corr15_nowork.csv", wide nostar se mtitles replace



*** 4.1 reproduce Bobbitt-Zeher(2007), table 3, correcting for moderation of family effect and endogeneous selection (incl. non-employment) ***
append using "Data\imputed_noempl.dta"
mi svyset[pweight=X1gewinsg]

matrix tA4 = J(6 , 4 , .)
matrix colnames tA4 = 1_modelnr 2_betafemale 3_se 4_perc_expl
/* matrix for t3_exact 
	rows: models
	columns:
	1 - model number
	2 - conditional beta female
	3 - s.e.
	4 - percentage of gap explained
	*/
mi estimate, post: qui reg inc_year frau [pweight=X1gewinsg]
	local baseline 		  = _b[frau]
	matrix tA4[1,2] = _b[frau]
	matrix tA4[1,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' [pweight=X1gewinsg]
	matrix tA4[2,2] = _b[frau]
	matrix tA4[2,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' `values' [pweight=X1gewinsg]
	matrix tA4[3,2] = _b[frau]
	matrix tA4[3,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' `values' `education' [pweight=X1gewinsg]
	matrix tA4[4,2] = _b[frau]
	matrix tA4[4,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' `values' `education' kinder verhei [pweight=X1gewinsg]
	matrix tA4[5,2] = _b[frau]
	matrix tA4[5,3] = _se[frau]
mi estimate, post: qui reg inc_year frau `background' `values' `education' kinder kinderxfrau verhei verheixfrau [pweight=X1gewinsg]
	matrix tA4[6,2] = _b[frau]
	matrix tA4[6,3] = _se[frau]

* compute percentage explained *
forvalues row = 1/6	{
	matrix tA4[`row',1] = `row'
	matrix tA4[`row',4] = (`baseline' - tA4[`row',2]) / `baseline'
	}
matrix list tA4
putexcel set "Output\tA4.xlsx", replace
putexcel B2 = matrix(tA4, names) using "Output\tA4.xlsx", replace


*** 4.2 reproduce Bobbitt-Zeher(2007), table 4, correcting for misattribution of family effect and endogeneous selection (incl. non-employment) and overcontrol bias (work) ***
drop C_*
mcenter parses zigeld fa_frau

mi estimate, cmdok post: oaxaca inc_year ///
	C_parses ///											/* background ses */
	C_zigeld ///											/* importance of having lots of money */ 	
	(scores: z_examen z_abinote) ///						/* scores */
	C_fa_frau ///											/* percentage female of college major */
	unifh ///												/* institutional selectivity */
	promo_fertig ///										/* doctoral degree */
	(family: kinder verhei), by(frau) weight(.5) svy		/* family formation */
	
est sto tA5
esttab  tA5 using "Output\tA5.csv", wide nostar se mtitles replace


*** END OF DOFILE ***
